<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap CSS-->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/vendor/bootstrap/css/bootstrap.css">
    <!-- Font Awesome CSS-->
    <link rel="stylesheet"
          href="${pageContext.request.contextPath}/assets/vendor/font-awesome/css/font-awesome.min.css">
    <!-- Custom Font Icons CSS-->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/css/font.css">
    <!-- theme stylesheet-->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/css/style.default.css" id="theme-stylesheet">
    <!-- Custom stylesheet - for your changes-->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/css/custom.css">
    <title>会议详情</title>
    <style>

        .myTitle > input {
            float: right;
            margin-left: 15px;
        }

    </style>
</head>
<body>
<%@include file="../publicjsp/head.jsp" %>
<div class="d-flex align-items-stretch">
    <!-- Sidebar Navigation-->
    <nav id="sidebar">
        <!-- Sidebar Header-->
        <!-- Sidebar Header-->
        <%@include file="../publicjsp/sideHead.jsp" %>
        <!-- Sidebar Navidation Menus--><span class="heading">Main</span>
        <%@include file="../publicjsp/sidebar.jsp" %>

    </nav>
    <!-- Sidebar Navigation end-->
    <div class="page-content">
        <div class="page-header">
            <div class="container-fluid">
                <h2 class="h5 no-margin-bottom">会议详情</h2>
            </div>
        </div>

        <section class="no-padding-bottom">

            <div class="myTitle">
                <h3 class="text-center">${conference.title}</h3>
                <c:if test="${conference.status == 1}">
                    <c:if test="${userId == conference.uId}">
                        <input id="end"  type="button" value="结束会议" class="btn btn-danger">
                    </c:if>
                    <c:if test="${userId != conference.uId}">
                        <c:if test="${is == 1}">
                            <input type="button" value="已经参加会议会议" class="btn btn-danger" disabled="disabled">
                        </c:if>
                        <c:if test="${is == 2}">
                            <input id="join" type="button" value="参加会议" class="btn btn-danger">
                        </c:if>
                    </c:if>
                </c:if>

            </div>

            <div class="myContent">
                <p class="h6"><strong>部门：</strong>${conference.deptName}</p>
                <p class="h6"><strong>应到：</strong>${count}<span>人</span></p>
                <p class="h6"><strong>实到：</strong>${yes}<span>人</span></p>
                <p class="h6"><strong>未到：</strong>${no}<span>人</span></p>
                <textarea style="padding: 2px" disabled="disabled" class="form-control"
                          rows="11">${conference.content}</textarea>


            </div>

            <div class="text-right myList">
                <p>日期：${conference.publishDate}0</p>
            </div>
        </section>

        <%@include file="../publicjsp/footer.jsp" %>
    </div>
</div>

<!-- JavaScript files-->
<script src="${pageContext.request.contextPath}/assets/vendor/jquery/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/vendor/popper.js/umd/popper.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/vendor/jquery.cookie/jquery.cookie.js"></script>
<script src="${pageContext.request.contextPath}/assets/vendor/chart.js/Chart.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/vendor/jquery-validation/jquery.validate.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/charts-home.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/front.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/custom.js"></script>

</body>
<script>
    $(function () {
        $("#end").click(function () {
            console.log("点击结束会议");
            window.location.href = "${pageContext.request.contextPath}/meet/endMeet?mId=${conference.id}"
        });

        $("#join").click(function () {
            console.log("点击加入会议");
            window.location.href = "${pageContext.request.contextPath}/meet/joinMeet?mId=${conference.id}"
        })
    })

</script>
</html>